package com.ruicar.afs.cloud.basic.common.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.basic.common.condition.DeductionInfoChildCondition;
import com.ruicar.afs.cloud.basic.common.condition.QueryCustInfoMultipleCondition;
import com.ruicar.afs.cloud.basic.common.entity.BasicReceiptDealDetails;
import com.ruicar.afs.cloud.basic.common.entity.BasicRepaymentPlan;
import com.ruicar.afs.cloud.basic.detail.vo.RentInfoVO;
import com.ruicar.afs.cloud.batch.entity.AfsBatchInfo;

import java.util.Date;
import java.util.List;

/**
 * @author: Lee
 * @date 2020-05-30 04:34:35 
 * @description 
 */
public interface BasicRepaymentPlanService extends IService<BasicRepaymentPlan> {
    /**
     *
     * @param contractNo
     * @return 根据合同号码查询已还款的期数列表
     */
    List<RentInfoVO> queryRepaymentInfo(String contractNo,String isOverdue);

    /**
     * 根据证件号码查询还款及扣款信息
     * @param certNo
     * @return
     */
    List<DeductionInfoChildCondition> deductionInfo(QueryCustInfoMultipleCondition condition);

    /**
     * 收款撤销本金处理
     * @author ZC.GUO
     * @param receiptDealDetails 收据明细
     * @return
     */
    public void handleCapitalForCancel(BasicReceiptDealDetails receiptDealDetails, AfsBatchInfo afsBatchInfo, Date batchDate);
    /**
     * 收款撤销利息处理
     * @author ZC.GUO
     * @param receiptDealDetails 收据明细
     * @return
     */
    public void handleInterestForCancel(BasicReceiptDealDetails receiptDealDetails,AfsBatchInfo afsBatchInfo, Date batchDate);
    /**
     * 根据合同号和期数获取还款计划表信息
     */
    public BasicRepaymentPlan getPlan(String contractNo,Integer termNo);

    /**
     * 根据还款计划表进行相关计算
     * @author ZC.GUO
     * @param repaymentPlanList
     * @return
     */
    public BasicRepaymentPlan calculateRepaymentInfo(List<BasicRepaymentPlan> repaymentPlanList);



    /**
     * 根据合同号查询逾期次数
     */
    public int getOverdueInfo(String contractNo);

}
